<template>
  <svg-icon @click="fullScreen" icon-class="fullscreen"></svg-icon>
</template>

<script>
import screenfull from "screenfull";
export default {
  methods: {
    fullScreen() {
      // 判断是否可全屏
      if (screenfull.isEnabled) {
        screenfull.request();
      } else {
        // 不支持全屏
        this.$message.warning("当前浏览器不支持全屏!");
      }
    },
  },
};
</script>

<style>
</style>